<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchSell.ascx.cs" Inherits="SearchSell" %>
<link href="css/stylessearchtext.css" rel="stylesheet" type="text/css" />

<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>

<script src="js/jquery.autocomplete1.js" type="text/javascript"></script>

<script src="js/jquery.autocomplete-min.js" type="text/javascript"></script>

<div class="search_top_main" style="margin-left: -230px;">
    <input type="text" class="text_box fl" name="q" id="query1" />
    <asp:DropDownList ID="ddlcountry" CssClass="cb_box fl" runat="server">
    </asp:DropDownList>
    <asp:DropDownList ID="ddlCat" CssClass="cb_box fl" runat="server">
    </asp:DropDownList>
    <input type="submit" class="btn_search_main" id="btnSearch" onclick="opensearch();return false;"
        value="SEARCH" />
</div>
<script type="text/javascript">
            function processKey(e)
            {
                if (null == e)
                    e = window.event ;
                if (e.keyCode == 13)  {
                    document.getElementById("btnSearch").click();
                    return false;
                }
            }
            function opensearch()
            {
            //alert("hihi");
                var txtsearch = document.getElementById("query1");               
                var ddlcountry = document.getElementById("<%= ddlcountry.ClientID %>");
                var Valueddlcountry = ddlcountry.options[ddlcountry.selectedIndex].value;
                var ddlCat = document.getElementById("<%= ddlCat.ClientID %>");
                var ValueddlCat = ddlCat.options[ddlCat.selectedIndex].value;             
                var test = txtsearch.value +"&country="+ Valueddlcountry +"&idcat="+ValueddlCat;
                //alert(test);
                window.location="ProductSearchSell.aspx?key="+test;
              
            }
</script>
